﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
    Id="MultiItemApprovalButton"
    RegistrationType="List"
    RegistrationId="107"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
         Location="Ribbon.ListItem.Actions.Controls._children">
          <Button
           Id="Ribbon.ListItem.Actions.Controls.MultiItemApprovalButton"
           Alt="Approve Multiple Items"
           Sequence="10"
           Image32by32="/_layouts/1033/images/GiveFeedback32.png"
           Command="ApproveMultipleItems"
           LabelText="Approve Multiple Items"
           TemplateAlias="o2"/>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
           EnabledScript="javascript:
           function enableMultiApproval()
           {
             var items = SP.ListOperation.Selection.getSelectedItems();
             return (items.length > 0);
           }
           enableMultiApproval();"
         Command="ApproveMultipleItems"
         CommandAction="javascript:ApproveItems(); " />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
       Location="ScriptLink"
       ScriptSrc ="~SiteCollection/Style Library/jsScriptFiles/jsHelpers.js"
       Sequence="200"/>
  <CustomAction
      Location="ScriptLink"
      ScriptSrc ="~SiteCollection/Style Library/jsScriptFiles/jquery-1.6.4.min.js"
      Sequence="100"/>
</Elements>
